fix: resolve n8n community node pre-check failures#6
fix: resolve n8n community node pre-check failures#6pranavjana wants to merge 2 commits intomainfrom
Conversation
Remove retry logic and custom timeout in favor of n8n's built-in execution timeout. Removes timeout option from node UI.
- Remove setTimeout/clearTimeout to pass security scan - Fix credential icon format from object to string - Update repo URL to point to n8n subfolder - Remove timeout option from node UI
📝 WalkthroughWalkthroughThis pull request simplifies the Tinyfish node integration by removing timeout handling and retry logic. The icon property in the TinyfishApi credential is changed from a dual-theme object to a single string path. The consumeSseStream function no longer accepts a timeout parameter, and the retry mechanism with MAX_RETRIES and related helpers has been removed from tinyfishApiRequest. The Tinyfish node no longer extracts or passes timeout values to these functions. Additionally, the Timeout (Seconds) UI option is removed from the description, and package metadata is updated with a version bump and adjusted repository URL. 🚥 Pre-merge checks | ✅ 2✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
n8n/nodes/Tinyfish/GenericFunctions.ts (1)
53-56:⚠️ Potential issue | 🟡 MinorStale JSDoc comment: retry logic was removed.
The comment still states "Retries on 429/5xx with exponential backoff (max 3 retries)" but the retry mechanism has been removed in this PR. Update the comment to reflect the current behavior.
📝 Proposed fix
/** * Make an authenticated request to the TinyFish API. - * Retries on 429/5xx with exponential backoff (max 3 retries). + * Relies on n8n's built-in execution timeout for error handling. */🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@n8n/nodes/Tinyfish/GenericFunctions.ts` around lines 53 - 56, The JSDoc above the TinyFish API request implementation (the comment starting "Make an authenticated request to the TinyFish API.") is stale—remove or update the sentence "Retries on 429/5xx with exponential backoff (max 3 retries)" to reflect that the retry mechanism was removed; edit that JSDoc to state the current behavior (single authenticated request with no automatic retries) and keep any auth/response details accurate so the comment matches the actual implementation.
🧹 Nitpick comments (1)
n8n/nodes/Tinyfish/GenericFunctions.ts (1)
223-225: Redundant try/catch that only rethrows.The outer catch block on lines 223-225 catches the error and immediately rethrows it without any transformation or logging. This is unnecessary since the inner error handling (lines 147-154) already throws appropriate errors.
♻️ Proposed fix to remove redundant wrapper
export async function consumeSseStream( this: IExecuteFunctions, payload: IDataObject, ): Promise<IDataObject> { const credentials = await this.getCredentials('tinyfishApi'); const apiKey = credentials.apiKey as string; let lastProgress = ''; - try { - const response = await fetch(`${API_BASE_URL}/v1/automation/run-sse`, { + const response = await fetch(`${API_BASE_URL}/v1/automation/run-sse`, { method: 'POST', headers: { 'X-API-Key': apiKey, 'Content-Type': 'application/json', }, body: JSON.stringify(payload), - }); + }); // ... rest of the function body unchanged ... return finalResult; - } catch (error) { - throw error; - } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@n8n/nodes/Tinyfish/GenericFunctions.ts` around lines 223 - 225, The outer try/catch that catches and immediately rethrows the error is redundant—remove the catch block (the closing catch { throw error; } that follows the surrounding try in GenericFunctions.ts) so errors from the inner logic (which already throw appropriate errors around the inner error handling) propagate naturally; ensure you only delete the catch clause and its brace while keeping the try body intact so compilation and control flow are unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@n8n/package.json`:
- Around line 20-23: The repository.url in package.json is a GitHub web UI path;
change it to a cloneable Git URL (e.g.,
git+https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git) and add
a repository.directory field set to "n8n" so npm can resolve the monorepo
subpackage; update the repository object (repository.url and add
repository.directory) in package.json to use the .git clone URL and the
subdirectory name.
---
Outside diff comments:
In `@n8n/nodes/Tinyfish/GenericFunctions.ts`:
- Around line 53-56: The JSDoc above the TinyFish API request implementation
(the comment starting "Make an authenticated request to the TinyFish API.") is
stale—remove or update the sentence "Retries on 429/5xx with exponential backoff
(max 3 retries)" to reflect that the retry mechanism was removed; edit that
JSDoc to state the current behavior (single authenticated request with no
automatic retries) and keep any auth/response details accurate so the comment
matches the actual implementation.
---
Nitpick comments:
In `@n8n/nodes/Tinyfish/GenericFunctions.ts`:
- Around line 223-225: The outer try/catch that catches and immediately rethrows
the error is redundant—remove the catch block (the closing catch { throw error;
} that follows the surrounding try in GenericFunctions.ts) so errors from the
inner logic (which already throw appropriate errors around the inner error
handling) propagate naturally; ensure you only delete the catch clause and its
brace while keeping the try body intact so compilation and control flow are
unchanged.
| "repository": { | ||
| "type": "git", | ||
| "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git", | ||
| "directory": "n8n" | ||
| "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n" | ||
| }, |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
npm package.json repository field format requirements GitHub URL
💡 Result:
In package.json, the repository field can be either:
- An object (recommended) with
typeandurl(optionallydirectoryfor monorepos):
{
"repository": {
"type": "git",
"url": "git+https://github.com/OWNER/REPO.git"
}
}The url should be a VCS-cloneable URL (for machines), not a browser “project page” URL. [1]
- A shorthand string (supported, but npm may normalize it to the object form on publish and warn):
{ "repository": "github:OWNER/REPO" }or even:
{ "repository": "OWNER/REPO" }npm supports shorthands for GitHub/Gist/Bitbucket/GitLab similar to npm install syntax. [1]
If you’re publishing to GitHub Packages, GitHub notes the repository field should match your GitHub repo URL (example given as https://github.com/my-org/test.git). [2]
Sources: [1] npm Docs package.json → repository field, formats, shorthands, normalization, directory option; [2] GitHub Docs on npm registry + repository field matching GitHub repo URL.
🏁 Script executed:
# Check the actual current state of the n8n package.json file
find . -name "package.json" -path "*/n8n/*" -type f | head -5Repository: tinyfish-io/tinyfish-web-agent-integrations
Length of output: 105
🏁 Script executed:
# Look at the n8n/package.json file directly
cat n8n/package.json | head -30Repository: tinyfish-io/tinyfish-web-agent-integrations
Length of output: 956
Invalid repository URL format for npm package.json.
The repository.url must be a Git-cloneable URL, not a GitHub web UI URL. The current value https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n is a browser path and will fail when npm attempts to resolve the repository. For monorepo subdirectories, use the base repository .git URL with the directory field:
🛠️ Proposed fix
"repository": {
"type": "git",
- "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations/tree/main/n8n"
+ "url": "https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git",
+ "directory": "n8n"
},🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@n8n/package.json` around lines 20 - 23, The repository.url in package.json is
a GitHub web UI path; change it to a cloneable Git URL (e.g.,
git+https://github.com/tinyfish-io/tinyfish-web-agent-integrations.git) and add
a repository.directory field set to "n8n" so npm can resolve the monorepo
subpackage; update the repository object (repository.url and add
repository.directory) in package.json to use the .git clone URL and the
subdirectory name.
Summary